<?php
require $_SERVER["DOCUMENT_ROOT"] . "/aonce_connect.php";

$convocatoria = isset($_GET["conv"]) ? $_GET["conv"] : NULL;
if($convocatoria == NULL)
	$convocatoria = isset($_POST["conv"]) ? $_POST["conv"] : NULL;

if($convocatoria == NULL){
	$err_msg = "Convocatoria no econtrada";
//	redirect_error($msg);
	printf($err_msg);
}

/*
 * Queries de obtenci'on de la convocatoria
 */
$conv_fields = "tituloconvocatoria AS titulo, datosconvocatoria AS datos, textoconvocatoria AS text, imagenconvocatoria AS foto, orientacionconvocatoria AS ori";
$conv_query = "SELECT $conv_fields FROM convocatoria WHERE idconvocatoria=$convocatoria LIMIT 1;";
//echo $conv_query;
$link = conecta();
$conv_result = $link->query($conv_query);
$link->close();

/*
 * Asociaci'on de datos de convocatoria con variables
 */
$conv_data = $conv_result->fetch_assoc();
?>
<!--Force IE6 into quirks mode with this comment tag-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Alternativa Once</title>
<link href="styleIndex.css" rel="stylesheet" type="text/css" />
<link href="styleArtista.css" rel="stylesheet" type="text/css" />
<style>

</style>
</head>
<body>

<div id="framecontent">
<div class="seccioninterior">

<?php require "foot.php";?>

</div>
</div>

<div id="maincontent">

<?php require "head.php";?>

<div style="border:0px solid #f00; float:left">
<div class="seccioninterior" style="height:455px; width:390px; border:0px solid #ccc; margin-top:0">

<div class="detallesobratop">
<?php 
	printf("<div>%s</div>\n", $conv_data["datos"]);
?>
<!--
  <div>INVERSIONES EN EL PAISAJE</div>
  <div>MARIO SALINAS</div>
  <div>&nbsp;</div>
  <div>Inauguracion 8:00 pm</div>
  <div>Del 30.04.2009</div>
  <div>al 30.05.2009</div>
-->
</div>

<div class="datosCuadroDerechaAbajo">
<div></div>
<div></div>
<div></div>
</div>
</div>

<div class="seccioninterior" style="width:390px; margin-top:0">
<div style="float: left">
<p class="font10"><?php echo $conv_data["text"];?></p>
</div>
</div>
</div>

<div style="">
<div class="cuadroDerechoArtista">
<h1 class="tituloArtista"><?php echo $conv_data["titulo"];?></h1>
<div class="cuadroDerechoArtistaGrisVertical">
<img src="uploads/<?php echo $conv_data["foto"];?>" />
</div>

</div>
</div>
</div>


</body>
</html>
